package com.wanxi.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

import java.util.Date;
import java.util.Set;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Role {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private String roleName;
    private String roleKey;
    private Integer enable;
    private Date createTime;
    private Date updateTime;
    private String remark;

    @TableField(exist = false)
    private Set<Permission> permissions;
}
